const mongoose = require("mongoose");
mongoose.set('useFindAndModify', false)
mongoose.connect("mongodb://localhost/demo", {
  useNewUrlParser: true,
  useUnifiedTopology: true,
});
const db = mongoose.connection;
db.on("error", console.error.bind(console, "connection error:"));
module.exports = mongoose
